<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="../js/jquery-1.11.1.js"></script>
		<style>
			.imga{
				animation: dfc .8s linear infinite;
			}
			.imga1{
				animation: dfc1 .8s linear infinite;
			}
			/* 关键帧 */
			@keyframes dfc{
				0%{
					transform: rotate(180deg);
				}
				30%{
					transform: rotate(360deg);
				}
				100%{
					transform: rotate(720deg);
				}
			}
			@keyframes dfc1{
				0%{
					transform: rotateX(180deg) translate(20px) scale(1);
					
				}
				30%{
					transform: rotateX(360deg) translate(400px) scale(2);
				}
				100%{
					transform: rotateX(720deg) translate(2200px) scale(5);
				}
			}
		</style>
	</head>
	<body>
		<img src="../img/2.gif.png" class="" alt="" />
		<audio src="../img/GimmeMoremp3.mp3" autoplay></audio>
		<button id="btn1">开转</button>
		<button id="btn2">暂停</button>
		<button id="btn3">翻转</button>
		<script>
			//点击开转 图片切换 并且添加样式  
			$("#btn1").click(function(){
				$("img").attr("src","../img/勾子之神.jpg").addClass("imga");	
				$("audio").attr("src","../img/GimmeMoremp3.mp3");
				
			});
			$("#btn2").click(function(){
				$("img").removeClass("imga imga1");	
				$("audio").removeAttr("src");
				
			});
			$("#btn3").click(function(){
				$("img"). toggleClass("imga1");
				$("audio").attr("src","../img/GimmeMoremp3.mp3");
			});
		</script>
	</body>
</html>